package io.gitee.zhangbinhub.admin.entity

import com.mybatisflex.annotation.Id
import com.mybatisflex.annotation.Table
import io.gitee.zhangbinhub.acp.core.common.CommonTools
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty

@Table("t_application")
@ApiModel("应用信息")
data class Application(
    @Id
    @ApiModelProperty(name = "应用ID")
    var id: String = "",
    @ApiModelProperty(name = "应用名称")
    var appName: String = "",
    @ApiModelProperty(name = "密钥")
    var secret: String = CommonTools.getUuid32(),
    @ApiModelProperty(name = "权限范围，多个权限“,”分隔")
    var scope: String? = null,
    @ApiModelProperty(name = "应用标识")
    var identify: String? = null,
    @ApiModelProperty(name = "token 有效期")
    var accessTokenValiditySeconds: Int = 86400,
    @ApiModelProperty(name = "refresh token 有效期")
    var refreshTokenValiditySeconds: Int = 2592000,
    @ApiModelProperty(name = "是否可删除")
    var covert: Boolean = true
)